package com.itheima.work1120;

import java.util.LinkedHashMap;
import java.util.Set;

public class Demo5 {
    public static void main(String[] args) {
        LinkedHashMap<Student, String> map = new LinkedHashMap<>();
        Student s1 = new Student(01,"张伟",92);
        Student s2 = new Student(02,"王芳",94);
        Student s3 = new Student(03,"陈婧",86);
        Student s4 = new Student(79,"周洁",90);
        map.put(s1,"长安街东城区");
        map.put(s2,"国贸路海淀区");
        map.put(s3,"三里屯七星路");
        map.put(s4,"王府井街34号");
        Set<Student> keys = map.keySet();
        for(Student key:keys){
            System.out.println(key + map.get(key));
        }

    }
}
